#pragma once
#include "AnimationNode.h"
#include "DAEFloat3.h"
class RotationController;
/**
* Objects of this class control the rotation part of an animation node.
* @author Koen Samyn
*/
class RotationControllerNode: public AnimationNode
{
public:
	/**
	* Creates a new Rotation Controller node.
	* @param name the name for the node.
	*/
	RotationControllerNode(tstring name);
	/**
	* Destroys the Rotation Controller node.
	*/
	virtual ~RotationControllerNode(void);
	/**
	* Returns the rotation for this node at the specific time.
	* Time must be within the defined interval.
	* @param time the time to evaluate the rotation.
	* @param deltaTrans an extra transformation to apply to the transformation.
	* @param matrix the matrix that will be set to the current world transform of the animation.
	* for the animation.
	*/
	const bool GetTransformAt(float time, DAEMatrix& deltaTrans, DAEMatrix& matrix);
	/**
	* Sets the translation for this rotation controller.
	* @param translation the initial translation.
	*/
	void SetTranslation(DAEFloat3& translation){
		m_Translation.SetValues(translation);
	}

	/**
	* Returns the translation for this rotation controller.
	* @return the current translation.
	*/
	DAEFloat3& GetTranslation(){
		return m_Translation;
	}

	/**
	* Sets the scale for this rotation controller.
	* @param scale the new scale value.
	*/
	void SetScale(DAEFloat3& scale){
		m_Scale.SetValues(scale);
	}

	/**
	* Returns the scale for this rotation controller.
	* @return the scale for this transform.
	*/
	DAEFloat3& GetScale(){
		return m_Scale;
	}

	/**
	* Set the rotation controller for this node.
	* @param controller the new rotation controller for this node, the old controller
	* will be deleted.
	*/
	void SetRotationController(RotationController* pController);

	/**
	* Gets the rotation controller for this node.
	* @return the rotation controller for this node.
	*/ 
	RotationController* GetRotationController(){
		return m_pController;
	}

private:
	DAEFloat3 m_Translation;
	DAEFloat3 m_Scale;

	RotationController* m_pController;

	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	RotationControllerNode(const RotationControllerNode& t);
	RotationControllerNode& operator=(const RotationControllerNode& t);
};

